package com.huazhi.wzsnw.model;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MaintainRecord {
    private String tid;

    private Date maintaindate;

    private Date time;

    private String naturalname;

    private Integer devicenum;

    private String maintainproject;

    private String maintainstate;

    private String image;

    private String maintainuser;

    private String state;

    private String maintaindatestring;

    private String cunName;

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid == null ? null : tid.trim();
    }

    public Date getMaintaindate() {
        return maintaindate;
    }

    public void setMaintaindate(Date maintaindate) {
        this.maintaindate = maintaindate;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getNaturalname() {
        return naturalname;
    }

    public void setNaturalname(String naturalname) {
        this.naturalname = naturalname == null ? null : naturalname.trim();
    }

    public Integer getDevicenum() {
        return devicenum;
    }

    public void setDevicenum(Integer devicenum) {
        this.devicenum = devicenum;
    }

    public String getMaintainproject() {
        return maintainproject;
    }

    public void setMaintainproject(String maintainproject) {
        this.maintainproject = maintainproject == null ? null : maintainproject.trim();
    }

    public String getMaintainstate() {
        return maintainstate;
    }

    public void setMaintainstate(String maintainstate) {
        this.maintainstate = maintainstate == null ? null : maintainstate.trim();
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getMaintainuser() { return maintainuser; }

    public void setMaintainuser(String maintainuser) {
        this.maintainuser = maintainuser;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getMaintaindatestring() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        if(maintaindate != null && maintaindatestring == null){
            return sdf.format(maintaindate);
        }
        return maintaindatestring;
    }

    public String getCunName() {
        return cunName;
    }

    public void setCunName(String cunName) {
        this.cunName = cunName;
    }

    public void setMaintaindatestring(String maintaindatestring) {
        this.maintaindatestring = maintaindatestring;
    }
}